// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.modules.dao.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.liuxinlong.modules.dao.UserPostDao;
import com.liuxinlong.modules.entity.UserPost;
import com.liuxinlong.modules.mapper.UserPostMapper;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 类描述
 * <p>
 * 此类关联设计的功能
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022年2月22日
 */
@Service
public class UserPostDaoImpl extends ServiceImpl<UserPostMapper, UserPost> implements UserPostDao {

	@Override
	public List<UserPost> pageUserPostList(Map<String, Object> queryParam) {
		return baseMapper.pageUserPostList(queryParam);
	}

	@Override
	public int getUserPostCount(Map<String, Object> queryParam) {

		return baseMapper.getUserPostCount(queryParam);
	}

	@Override
	public void addUserPost(UserPost role) {
		baseMapper.insert(role);
	}

	@Override
	public void updateUserPost(UserPost role) {
		baseMapper.updateById(role);
	}

	@Override
	public void deleteUserPost(String roleId) {
		baseMapper.deleteById(roleId);
	}

	@Override
	public Map<String, Map<String, String>> getUserPostMap() {
		return baseMapper.getUserPostMap();
	}

	@Override
	public List<UserPost> getUserPostList() {
		return baseMapper.getUserPostList();
	}

	@Override
	public Map<String, Map<String, String>> getUserPostMapByName() {
		return baseMapper.getUserPostMapByName();
	}

	@Override
	public UserPost getUserPostBySn(String sn) {
		return baseMapper.getUserPostBySn(sn);
	}

}
